package com.cool.common.exception;

public enum ErrorCode {
    SUCCESS("0000", "成功"),
    PARAM_ERROR("1001", "参数错误"),
    UNAUTHORIZED("1002", "未授权"),
    FORBIDDEN("1003", "禁止访问"),
    NOT_FOUND("1004", "资源不存在"),
    INTERNAL_ERROR("5000", "内部服务器错误"),
    THIRD_PARTY_ERROR("5001", "第三方服务错误"),
    TIMEOUT_ERROR("5002", "请求超时");

    private final String code;
    private final String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
